]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st-texture-cache: Remove a no-op scale pixbuf
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 14 Feb 2013 20:32:02 +0000 (15:32 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 14 Feb 2013 21:09:04 +0000 (16:09 -0500)
We already passed GtkIconTheme the size when it wanted to load it,
so it knows the desired size and will scale it to what we want.

https://bugzilla.gnome.org/show_bug.cgi?id=692845

src/st/st-texture-cache.c

index 7cd4b36bbc3a20249578e00d0e6b71dd2fde6862..4fd119011b4826624bd8503fac2a87d4dd972f72 100644 (file)
@@ -246,9 +246,7 @@ impl_load_pixbuf_gicon (GtkIconInfo  *info,
                         StIconColors *colors,
                         GError      **error)
 {
-  int scaled_width, scaled_height;
   GdkPixbuf *pixbuf;
-  int width, height;
 
   if (colors)
     {
@@ -272,21 +270,6 @@ impl_load_pixbuf_gicon (GtkIconInfo  *info,
       pixbuf = gtk_icon_info_load_icon (info, error);
     }
 
-  if (!pixbuf)
-    return NULL;
-
-  width = gdk_pixbuf_get_width (pixbuf);
-  height = gdk_pixbuf_get_height (pixbuf);
-
-  if (compute_pixbuf_scale (width,
-                            height,
-                            size, size,
-                            &scaled_width, &scaled_height))
-    {
-      GdkPixbuf *scaled = gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR);
-      g_object_unref (pixbuf);
-      pixbuf = scaled;
-    }
   return pixbuf;
 }